<span xmlns:f="http://java.sun.com/jsf/core"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  id="#{widget.id}">
<c:if test="#{widget.mode != 'edit'}">#{field}</c:if>
<c:if test="#{widget.mode == 'edit'}">

  <a4j:region id="#{widget.id}_region">

    <nxl:widgetType name="checkbox" value="#{field}"
      mode="#{widget.mode}"
      properties="#{widget.properties}">
      <a4j:ajax event="change"
        render="#{widgetProperty_reRender}"
        immediate="#{widgetProperty_immediate}"
        execute="#{widgetProperty_ajaxSingle ? '@this' : '@form'}" />
    </nxl:widgetType>

    <a4j:status>
      <f:facet name="start">
        <h:graphicImage value="/img/standart_waiter.gif" />
      </f:facet>
    </a4j:status>

  </a4j:region>

</c:if>
</span>
